package com.zhu.transaction.pojo;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author zhu
 * @since 2021-01-07
 */
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "TUser对象", description = "")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    private String id;

    @ApiModelProperty(value = "性别", example = "1")
    private Integer sex;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "真实姓名")
    private String realName;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "账户转态", example = "1")
    private Integer accountState;

    @ApiModelProperty(value = "账户类型", example = "1")
    private Integer accountType;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "注册时间")
    private Date registerTime;

    @ApiModelProperty(value = "联系地址")
    private String address;

    @ApiModelProperty(value = "用户头像")
    private String avatar;

    @ApiModelProperty(value = "自定义问题")
    private String question;

    @ApiModelProperty(value = "问题答案")
    private String answer;

    public String getStringRegisterTime() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm").format(this.registerTime);
    }

}
